#!/bin/bash

curl -X PUT "http://127.0.0.1:9200/dms_portrait_index" -H 'Content-Type: application/json' -d '
{
	"settings": {
		"analysis": {
			"analyzer": {
				"comma": {
					"type": "pattern",
					"pattern": ","
				}
			}
		}
	},
	"mappings": {
		"properties": {
			"ogId": {
				"type": "keyword",
				"normalizer": "lowercase"
			},
			"realOgId": {
				"type": "text",
				"analyzer": "comma"
			},
			"portraitId": {
				"type": "text",
				"analyzer": "comma"
			},
			"portraitType": {
				"type": "keyword",
				"store": true
			},
			"createTime": {
				"type": "long",
				"store": true
			}
		}

	}
}
'